home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Procedure Name:
- // buildPreferenceMenu
- //
- // Description:
- // Create the UI Elements menu
- //
- // Input Arguments:
- // parent to parent the menu to.
- //
- // Return Value:
- // None.
- //
-
- global proc buildPreferenceMenu ( string $parent ) {
-
- // Clear out all menu items, and rebuild
- // the menu to keep the menu in sync across
- // the different Maya UI
- //
- if( `menu -q -ni $parent` != 0 ) {
- //
- // Menu is built already - just return
- //
- updatePrefsMenu;
- return;
- }
-
- setParent -m $parent;
-
- //
- // Create menu items
- //
- menuItem -label "Status Line"
- -checkBox true
- -annotation (getRunTimeCommandAnnotation("ToggleStatusLine"))
- -command "ToggleStatusLine"
- statusLineItem;
-
- menuItem -label "Shelf"
- -checkBox true
- -annotation (getRunTimeCommandAnnotation("ToggleShelf"))
- -command "ToggleShelf"
- shelfItem;
-
- menuItem -label "Time Slider"
- -checkBox true
- -annotation (getRunTimeCommandAnnotation("ToggleTimeSlider"))
- -command "ToggleTimeSlider"
- timelineItem;
-
- menuItem -label "Range Slider"
- -enable true
- -checkBox true
- -annotation (getRunTimeCommandAnnotation("ToggleRangeSlider"))
- -command "ToggleRangeSlider"
- playbackRangeItem;
-
- menuItem -label "Command Line"
- -checkBox true
- -annotation (getRunTimeCommandAnnotation("ToggleCommandLine"))
- -command "ToggleCommandLine"
- commandLineItem;
-
- menuItem -label "Help Line"
- -checkBox true
- -annotation (getRunTimeCommandAnnotation("ToggleHelpLine"))
- -command "ToggleHelpLine"
- helpLineItem;
-
- menuItem -divider true;
-
- menuItem -label "Toolbox"
- -checkBox true
- -annotation (getRunTimeCommandAnnotation("ToggleToolbox"))
- -command "ToggleToolbox"
- toolboxItem;
-
- menuItem -divider true;
-
- menuItem -label "Attribute Editor"
- -checkBox true
- -annotation (getRunTimeCommandAnnotation("ToggleAttributeEditor"))
- -command "ToggleAttributeEditor"
- attrEditorItem;
-
- menuItem -label "Tool Settings"
- -checkBox true
- -annotation (getRunTimeCommandAnnotation("ToggleToolSettings"))
- -command "ToggleToolSettings"
- toolSettingsItem;
-
- menuItem -label "Channel Box / Layer Editor"
- -checkBox true
- -annotation (getRunTimeCommandAnnotation("ToggleChannelsLayers"))
- -command "ToggleChannelsLayers"
- channelsLayersItem;
-
- menuItem -divider true;
-
- menuItem -label "Hide UI Elements"
- -annotation (getRunTimeCommandAnnotation("HideUIElements"))
- -command "HideUIElements";
-
- menuItem -label "Show UI Elements"
- -annotation (getRunTimeCommandAnnotation("ShowUIElements"))
- -command "ShowUIElements";
-
- menuItem -label "Restore UI Elements"
- -annotation (getRunTimeCommandAnnotation("RestoreUIElements"))
- -command "RestoreUIElements";
-
- setParent -menu ..;
-
- // Run the proc that keeps the checkboxes in sync
- // with what decorations on Maya's windows are shown
- // or not shown
- //
- updatePrefsMenu;
- }
-